<div ng-controller="goodsGroupList1Ctrl">
{if $_GPC['iseditor']}
	<!--商品分组2-->
	<div class="app-tagList2-edit">
		<div class="arrow-left"></div>
		<div class="inner">
			<div class="panel panel-default">
				<div class="panel-body">
					<form class="form-horizontal">
						<div class="add-goodsgroup-item card" ng-repeat="menu in activeItem.params.catelist">
							<div class="btns">
								<a href="javascript:;" ng-click="deleteItem($index)"><i class="fa fa-times"></i></a>
							</div>
							<div class="form-group" style="margin:0;">
								<label class="control-label col-xs-3">商品来源</label>
								<div class="col-xs-6 form-control-static"><a href="#">{{menu.catename}}</a></div>
								<div class="col-xs-3 form-control-static"><a href="javascript:;" ng-click="changeItem($index)">修改</a></div>
							</div>
						</div>
						<div class="add-goodsgroup card" ng-show="activeItem.params.catelist.length < 8">
							<span><i class="fa fa-plus-circle green"></i> &nbsp;<a href="javascript:;" ng-click="showSearchCateList()"> 添加商品分组</a></span>
						</div>
						<div class="help-block">选择商品来源后，左侧实时预览暂不支持显示其包含的商品数据</div>
						<div class="form-group">
							<label class="col-xs-3 control-label">列表样式</label>
							<div class="col-xs-9">
								<label for="lgImg" class="radio-inline">
									<input type="radio" ng-model="activeModules[activeIndex].params.listStyle" value="1" name="goods-listStyle" id="lgImg"> 大图
								</label>
								<label for="smImg" class="radio-inline">
									<input type="radio" ng-model="activeModules[activeIndex].params.listStyle" value="2" name="goods-listStyle" id="smImg"/>小图
								</label>
								<label for="defaultList" class="radio-inline">
									<input type="radio" ng-model="activeModules[activeIndex].params.listStyle" value="3" name="goods-listStyle" id="defaultList" checked="checked">一大两小
								</label>
								<label for="detailList" class="radio-inline">
									<input type="radio" ng-model="activeModules[activeIndex].params.listStyle" value="4" name="goods-listStyle" id="detailList"/>详细列表
								</label>
							</div>
						</div>
						<div class="form-group">
							<label class="col-xs-3 control-label"></label>
							<div class="col-xs-9" ng-switch="activeItem.params.listStyle">
								<!--一大两小样式设置-->
								<div class="card" ng-switch-when="3">
									<div class="form-group">
										<div class="col-xs-12">
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="1" name="goods-style" id="cardStyle">卡片样式
											</label>
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="2" name="goods-style" id="simpleStyle"/>极简样式
											</label>
										</div>
									</div>
									<div class="divider"></div>
									<div class="form-group" ng-show="activeItem.params.sizeType == 1">
										<div class="col-xs-12">
											<label class="checkbox-inline"><!--极简样式不显示该项-->
												<input type="checkbox" ng-model="activeItem.params.showBuyBtn" />显示购买按钮
											</label>
										</div>
										<div class="col-xs-12" style="margin:10px 0 0 15px;" ng-show="activeItem.params.showBuyBtn == true">
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="1">样式1
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="2"/>样式2
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="3"/>样式3
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="4"/>样式4
											</label>
										</div>
									</div>
									<div class=" form-group">
										<div class="col-xs-12">
											<label class="checkbox-inline">
												<input type="checkbox" ng-model="activeItem.params.showTitle" />显示商品名(小图不显示商品名)
											</label>
										</div>
									</div>
									<div class="form-group">
										<div class="col-xs-12">
											<label class="checkbox-inline">
												<input type="checkbox" ng-model="activeItem.params.showPrice" />显示价格
											</label>
										</div>
									</div>
								</div>
								<!--大图设置-->
								<div class="card"  ng-switch-when="1">
									<div class="form-group" ng-show="activeItem.params.sizeType == 1">
										<div class="col-xs-12">
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="1" name="goods-style" id="cardStyle">卡片样式
											</label>
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="2" name="goods-style" id="simpleStyle"/>极简样式
											</label>
										</div>
									</div>
									<div class="divider"></div>
									<div class="form-group" ng-show="activeItem.params.sizeType == 1">
										<div class="col-xs-12">
											<label class="checkbox-inline"><!--极简样式不显示该项-->
												<input type="checkbox" ng-model="activeItem.params.showBuyBtn" />显示购买按钮
											</label>
										</div>
										<div class="col-xs-12" style="margin:10px 0 0 15px;" ng-show="activeItem.params.showBuyBtn == true">
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="1">样式1
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="2"/>样式2
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="3"/>样式3
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="4"/>样式4
											</label>
										</div>
									</div>
									<div class=" form-group">
										<div class="col-xs-12">
											<label class="checkbox-inline">
												<input type="checkbox" ng-model="activeItem.params.showTitle" />显示商品名
											</label>
										</div>
									</div>
									<div class=" form-group">
										<div class="col-xs-12">
											<label class="checkbox-inline">
												<input type="checkbox" ng-model="activeItem.params.showDesc"/>显示商品简介
											</label>
										</div>
									</div>
									<div class="form-group">
										<div class="col-xs-12">
											<label class="checkbox-inline">
												<input type="checkbox" ng-model="activeItem.params.showPrice" />显示价格
											</label>
										</div>
									</div>
								</div>
								<!--小图设置-->
								<div class="card"  ng-switch-when="2">
									<div class="form-group">
										<div class="col-xs-12">
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="1" name="goods-style">卡片样式
											</label>
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="2" name="goods-style"/>极简样式
											</label>
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="4" name="goods-style"/>促销
											</label>
										</div>
									</div>
									<div class="divider"></div>
									<!--小图卡片样式,瀑布流样式-->
									<div class="form-group" ng-show="activeItem.params.sizeType == 1 || activeItem.params.sizeType == 3">
										<div class="col-xs-12">
											<label class="checkbox-inline"><!--极简样式不显示该项-->
												<input type="checkbox" ng-model="activeItem.params.showBuyBtn" />显示购买按钮
											</label>
										</div>
										<div class="col-xs-12" style="margin:10px 0 0 15px;" ng-show="activeItem.params.showBuyBtn == true">
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="1">样式1
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="2"/>样式2
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="3"/>样式3
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="4"/>样式4
											</label>
										</div>
									</div>

									<div class=" form-group" ng-show="activeItem.params.sizeType == 1 || activeItem.params.sizeType == 3">
										<div class="col-xs-12">
											<label class="checkbox-inline">
												<input type="checkbox" ng-model="activeItem.params.showTitle" />显示商品名
											</label>
										</div>
									</div>
									<div class="form-group" ng-show="activeItem.params.sizeType != 4">
										<div class="col-xs-12">
											<label class="checkbox-inline">
												<input type="checkbox" ng-model="activeItem.params.showPrice" />显示价格
											</label>
										</div>
									</div>
									<!--小图促销样式  无-->
								</div>
								<!--详细列表样式-->
								<div class="card"  ng-switch-when="4">
									<div class="form-group">
										<div class="col-xs-12">
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="1">卡片样式
											</label>
											<label class="radio-inline">
												<input type="radio" ng-model="activeItem.params.sizeType" value="2"/>极简样式
											</label>
										</div>
									</div>
									<div class="divider"></div>
									<div class="form-group" ng-show="activeItem.params.sizeType == 1 || activeItem.params.sizeType == 2">
										<div class="col-xs-12">
											<label class="checkbox-inline"><!--极简样式不显示该项-->
												<input type="checkbox" ng-model="activeItem.params.showBuyBtn" />显示购买按钮
											</label>
										</div>
										<div class="col-xs-12" style="margin:10px 0 0 15px;" ng-show="activeItem.params.showBuyBtn == true">
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="1">样式1
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="2"/>样式2
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="3"/>样式3
											</label>
											<label class="radio-inline">
												<input type="radio" name="btn-style" ng-model="activeItem.params.showBuyBtnStyle" value="4"/>样式4
											</label>
										</div>
									</div>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<!--end商品分组2-->
	<div id="modal-search-cate-goodsgrouplist2" class="modal fade in" role="dialog" aria-hidden="false">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h3>选择分类</h3>
				</div>
				<div class="modal-body">
					<table class="table table-hover">
							<thead class="navbar-inner">
								<tr>
									<th style="width:60%;">标题</th>
									<th style="width:30%; text-align:right">
										<div class="input-group input-group-sm hidden">
											<input type="text" class="form-control">
											<span class="input-group-btn">
												<button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>
											</span>
										</div>
									</th>
								</tr>
							</thead>
							<tbody ng-repeat="pcate in activeItem.params.searchCateList">
								<tr>
									<td><a href="#">{{pcate.name}}</a></td>
									<td class="text-right">&nbsp;</td>
								</tr>
								<tr ng-repeat="ccate in pcate.children track by $index">
									<td style="padding-left:50px;height:30px;line-height:30px;background-image:url('./resource/images/bg_repno.gif'); background-repeat:no-repeat; background-position: -245px -540px;"><a href="#">{{ccate.name}}</a></td>
									<td class="text-right">
										<a ng-show="changeIndex == -1" class="btn btn-default btn-sm" onclick="$(this).toggleClass('btn-primary')" data="{{ccate}}">选取</a>
										<a ng-show="changeIndex > -1" class="btn btn-default btn-sm" onclick="$(this).toggleClass('btn-primary')" ng-click="selectCateItem()" data="{{ccate}}">选取</a>
									</td>
								</tr>
							</tbody>
						</table>
						<div class="modal-footer" ng-show="changeIndex == -1">
							<button type="button" class="btn btn-primary" ng-click="selectCateItem()">确认使用</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
{else}
	<!--app商品分组2 商品展示样式同"商品"-->
	<div class="app-tagList2">
		<div class="inner">
			<ul class="nav nav-justified" ng-if="module.params.catelist.length > 0"><!--最多四个来源-->
				<li ng-class="{active : $index == 0}" ng-repeat="menu in module.params.catelist"><a href="#content2_{{$index+1}}" aria-controls="content2_{{$index+1}}" role="tab" data-toggle="tab">{{menu.catename}}</a></li>
			</ul>
			<div class="nav-content">
				<!--app商品-->
				<div class="app-goods goodslist">
					<div class="inner" ng-switch="module.params.listStyle">
						<!--卡片:goods-card,极简:goods-simple,促销:goods-sale;
							大图:lg   小图:sm  详细:detail
							购买按钮样式:btn1,btn2,btn3,btn4
						-->
					<!--一大两小样式-->
						<div class="defaultList tab-content" ng-switch-when="3">
							<ul class="goods-list clearfix">
								<li ng-class="{'col-xs-6 sm' : $index % 3 != 0, 'lg' : $index % 3 == 0, 'goods-simple' : module.params.sizeType == 2, 'js-default-content' : $index > 0}" ng-repeat="g in module.params.goodsList">
									<div ng-class="{'goods-card':module.params.sizeType == 1}">
										<a href="#">
											<div class="pic"><img src="" ng-src="{{g.thumb}}" /></div>
											<div class="goods-info">
												<p class="goods-title" ng-if="module.params.showTitle == true"><b>{{g.title}}</b></p>
												<p class="goods-sub-title c-black" ng-if="module.params.showDesc == true && module.params.listStyle == 1">{{g.desc}}</p>
												<p class="goods-price" ng-if="module.params.showPrice == true"><em>￥{{g.price}}</em></p>
											</div>
										</a>
										<div class="goods-buy js-buy-goods" ng-if="module.params.showBuyBtn == true && module.params.sizeType == 1" ng-class="{1 : 'btn1', 2 : 'btn2', 3: 'btn3', 4 : 'btn4'}[module.params.showBuyBtnStyle]"></div>
									</div>
								</li>
							</ul>
						</div>
					<!--大图样式-->
						<div class="lgImg tab-content" ng-switch-when="1">
							<ul class="goods-list">
								<li class="lg" ng-class="{'js-default-content' : $index > 0}" ng-repeat="g in module.params.goodsList">
									<div class="goods-card">
											<a href="">
											<div class="pic"><img src="" ng-src="{{g.thumb}}" /></div>
											<div class="goods-info">
												<p class="goods-title" ng-if="module.params.showTitle == true"><b>{{g.title}}</b></p>
												<p class="goods-sub-title c-black" ng-if="module.params.showDesc == true && module.params.listStyle == 1">{{g.desc}}</p>
												<p class="goods-price" ng-if="module.params.showPrice == true"><em>￥{{g.price}}</em></p>
											</div>
										</a>
										<div class="goods-buy js-buy-goods" data-goods-id="" ng-if="module.params.showBuyBtn == true && module.params.sizeType == 1" ng-class="{1 : 'btn1', 2 : 'btn2', 3: 'btn3', 4 : 'btn4'}[module.params.showBuyBtnStyle]"></div>
									</div>
								</li>
							</ul>
						</div>
					<!--小图样式-->
						<div class="smImg" ng-switch-when="2">
							<div class="tab-content" ng-switch="module.params.sizeType">
								<ul class="goods-list clearfix" ng-switch-when="1">
									<!--卡片样式-->
									<li ng-class="{'js-default-content' : $index > 0}" class="col-xs-6" ng-repeat="g in module.params.goodsList">
										<div class="goods-card sm ">
											<a href="#">
												<div class="pic"><img src="" ng-src="{{g.thumb}}" /></div>
												<div class="goods-info">
													<p class="goods-title" ng-if="module.params.showTitle == true"><b>{{g.title}}</b></p>
													<p class="goods-price" ng-if="module.params.showPrice == true"><em>￥{{g.price}}</em></p>
												</div>
											</a>
											<div class="goods-buy js-buy-goods" data-goods-id="" ng-if="module.params.showBuyBtn == true && (module.params.sizeType == 1 || module.params.sizeType == 3)" ng-class="{1 : 'btn1', 2 : 'btn2', 3: 'btn3', 4 : 'btn4'}[module.params.showBuyBtnStyle]"></div>
										</div>
									</li>
								</ul>
								<ul class="goods-list clearfix" ng-switch-when="2">
									<!--极简样式-->
									<li ng-class="{'js-default-content' : $index > 0}" class="col-xs-6" ng-repeat="g in module.params.goodsList">
										<div class="goods-simple sm ">
											<a href="#">
												<div class="pic"><img src="" ng-src="{{g.thumb}}" /></div>
												<div class="goods-info">
													<p class="goods-price" ng-if="module.params.showPrice == true"><em>￥{{g.price}}</em></p>
												</div>
											</a>
										</div>
									</li>
								</ul>
								<ul class="goods-list clearfix" ng-switch-when="4">
									<!--促销样式-->
									<li ng-class="{'js-default-content' : $index > 0}" class="col-xs-6" ng-repeat="g in module.params.goodsList">
										<div class="goods-sale sm ">
											<div class="pic"><a href="#"><img src="" ng-src="{{g.thumb}}" /></a></div>
											<div class="goods-info">
												<span class="goods-price pull-left" ng-if="module.params.showPrice == true">￥{{g.price}}</span>
												<span class="pull-right buy-btn"><a href="javascript:;" class="goods-buy js-buy-goods" data-goods-id=""> 我要抢购</a></span>
											</div>
										</div>
									</li>
								</ul>
							</div>
						</div>
					<!--详细列表样式-->
						<div class="detailList tab-content" ng-switch-when="4">
							<div ng-switch="module.params.sizeType">
								<ul class="goods-list clearfix" ng-switch-when="1">
									<li ng-class="{'js-default-content' : $index > 0}" class="goods-card" ng-repeat="g in module.params.goodsList">
										<a href="#">
											<div class="pic col-xs-6"><img src="" ng-src="{{g.thumb}}" /></div>
											<div class="col-xs-6">
												<div class="goods-info">
													<p class="goods-title"><b>{{g.title}}</b></p>
													<p class="goods-price"><em>￥{{g.price}}</em></p>
												</div>
											</div>
										</a>
										<div class="goods-buy js-buy-goods" ng-if="module.params.showBuyBtn == true" ng-class="{1 : 'btn1', 2 : 'btn2', 3: 'btn3', 4 : 'btn4'}[module.params.showBuyBtnStyle]"></div>
									</li>
								</ul>
								<ul class="goods-list clearfix" ng-switch-when="2">
									<li ng-class="{'js-default-content' : $index > 0}" class="goods-simple" ng-repeat="g in module.params.goodsList">
										<a href="#">
											<div class="pic col-xs-6"><img src="" ng-src="{{g.thumb}}" /></div>
											<div class="col-xs-6">
												<div class="goods-info">
													<p class="goods-title"><b>{{g.title}}</b></p>
													<p class="goods-price"><em>￥{{g.price}}</em></p>
												</div>
											</div>
										</a>
										<div class="goods-buy js-buy-goods" ng-if="module.params.showBuyBtn == true" ng-class="{1 : 'btn1', 2 : 'btn2', 3: 'btn3', 4 : 'btn4'}[module.params.showBuyBtnStyle]"></div>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
				<!--end商品-->
			</div>
		</div>
	</div>
	<!--end商品分组2-->
{/if}
</div>